import 'package:get/get.dart';

class NavigationController extends GetxController {
  // 当前页面索引
  var currentPageIndex = 0.obs;

  // 导航到指定页面
  void navigateToPage(int pageIndex) {
    currentPageIndex.value = pageIndex;
  }

  // 根据快捷方式导航
  void navigateByShortcut(String shortcutKey) {
    if (shortcutKey == 'PageA') {
      navigateToPage(0);
    } else if (shortcutKey == 'PageB') {
      navigateToPage(1);
    }
  }
}
